package main

import (
	"fmt"
	"runtime"
)

func main() {
	go func() {

		defer fmt.Println("ccccccc")
		test()
		fmt.Println("ddddddd")

	}()

	for {

	}
}

func test() {

	defer fmt.Println("aaaaaa")
	//	return      //打印   b a d c
	runtime.Goexit() //退出 goroutine  ，所以只打印  a c
	fmt.Println("bbbbbb")
}
